package com.example.controller;


import com.example.pojo.Department;
import com.example.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;


@RestController
@RequestMapping("/salary/table")
public class SalaryTableController {

    @Autowired
    private IDepartmentService departmentService;

    /**
     * 获取所有的部门
     * @return
     */
    @RequestMapping("/deps")
    public List<Department> departments() {
        return departmentService.getAllDeps();
    }
}
